// DockWnd.h: interface for the CDockWnd class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_BAR_H__9A4FA07D_F7BD_4521_91F9_82DCF01C17E7__INCLUDED_)
#define AFX_BAR_H__9A4FA07D_F7BD_4521_91F9_82DCF01C17E7__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "afxpriv.h"
#include "afxext.h"

#define DEFAULT_DOCKING_CX 230
#define DEFAULT_DOCKING_CY 130

class CDockWnd : public CControlBar  
{
	DECLARE_DYNAMIC(CDockWnd)
public:
	CDockWnd();
	virtual ~CDockWnd();
	// Generated message map functions
protected:
	//{{AFX_MSG(CDockWnd)
	afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnCloseDock();
	afx_msg void Refresh();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

public:	
	virtual BOOL Create(CWnd* pParentWnd, DWORD dwStyle, UINT nID);
	virtual void DoPaint(CDC* pDC);
	virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
	virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
	virtual CSize CalcDynamicLayout(int nLength, DWORD dwMode);
	BOOL CDockWnd::IsFloating();
protected:
	BOOL IsHorzDocked() const;
	BOOL IsVertDocked() const;
	void DrawGripper(CDC* pDC);
	CRect GetGripperRect();
	CRect GetButtonRect();

public:
	CListBox m_DockingList;
protected:
	CSize m_sizeDefault;
	CSize m_sizeFloat;
	CButton m_btnClose;
};

#endif // !defined(AFX_BAR_H__9A4FA07D_F7BD_4521_91F9_82DCF01C17E7__INCLUDED_)
